<!--
  function: function description
  author: 王代彬
  email: 1303329454@qq.com
  time: 2020年05月11日 18:27:12
  version: v1.0
  Modification record: 
  Modification: 
  Modified by: 
  Modification time: 
-->
<template>
    <div>
        <h1>所有可监听事件</h1>
        <span
            ><span class="font"
                >let eventBus = this.bpmnModeler.get("eventBus");</span
            >
            //获取所有可监听事件</span
        >
        <pre>
      let events = [
        "attach",
        "autoPlace",
        "autoPlace.end",
        "autoPlace.start",
        "bendpoint.move.cancel",
        "bendpoint.move.cleanup",
        "bendpoint.move.end",
        "bendpoint.move.hover",
        "bendpoint.move.move",
        "bendpoint.move.out",
        "bendpoint.move.start",
        "bpmnElement.added",
        "canvas.destroy",
        "canvas.init",
        "canvas.resized",
        "canvas.viewbox.changed",
        "canvas.viewbox.changing",
        "commandStack.canvas.updateRoot.executed",
        "commandStack.canvas.updateRoot.postExecute",
        "commandStack.canvas.updateRoot.preExecute",
        "commandStack.canvas.updateRoot.reverted",
        "commandStack.changed",
        "commandStack.connection.create.canExecute",
        "commandStack.connection.create.executed",
        "commandStack.connection.create.postExecute",
        "commandStack.connection.create.postExecuted",
        "commandStack.connection.create.preExecute",
        "commandStack.connection.create.preExecuted",
        "commandStack.connection.create.reverted",
        "commandStack.connection.delete.executed",
        "commandStack.connection.delete.preExecute",
        "commandStack.connection.delete.reverted",
        "commandStack.connection.layout.executed",
        "commandStack.connection.layout.postExecute",
        "commandStack.connection.layout.postExecuted",
        "commandStack.connection.layout.reverted",
        "commandStack.connection.move.executed",
        "commandStack.connection.move.preExecute",
        "commandStack.connection.move.reverted",
        "commandStack.connection.reconnect.canExecute",
        "commandStack.connection.reconnect.executed",
        "commandStack.connection.reconnect.postExecute",
        "commandStack.connection.reconnect.preExecute",
        "commandStack.connection.reconnect.reverted",
        "commandStack.connection.start.canExecute",
        "commandStack.connection.updateWaypoints.canExecute",
        "commandStack.connection.updateWaypoints.executed",
        "commandStack.connection.updateWaypoints.postExecute",
        "commandStack.connection.updateWaypoints.postExecuted",
        "commandStack.connection.updateWaypoints.reverted",
        "commandStack.element.autoResize.canExecute",
        "commandStack.element.copy.canExecute",
        "commandStack.element.updateAttachment.executed",
        "commandStack.element.updateAttachment.reverted",
        "commandStack.element.updateProperties.postExecute",
        "commandStack.element.updateProperties.postExecuted",
        "commandStack.elements.create.canExecute",
        "commandStack.elements.create.postExecute",
        "commandStack.elements.create.postExecuted",
        "commandStack.elements.create.preExecute",
        "commandStack.elements.create.revert",
        "commandStack.elements.delete.postExecuted",
        "commandStack.elements.delete.preExecute",
        "commandStack.elements.move.canExecute",
        "commandStack.elements.move.postExecuted",
        "commandStack.elements.move.preExecute",
        "commandStack.elements.move.preExecuted",
        "commandStack.label.create.postExecute",
        "commandStack.label.create.postExecuted",
        "commandStack.lane.add.postExecuted",
        "commandStack.lane.add.preExecute",
        "commandStack.lane.resize.postExecuted",
        "commandStack.lane.resize.preExecute",
        "commandStack.lane.split.postExecuted",
        "commandStack.lane.split.preExecute",
        "commandStack.shape.append.preExecute",
        "commandStack.shape.attach.canExecute",
        "commandStack.shape.create.canExecute",
        "commandStack.shape.create.execute",
        "commandStack.shape.create.executed",
        "commandStack.shape.create.postExecute",
        "commandStack.shape.create.postExecuted",
        "commandStack.shape.create.preExecute",
        "commandStack.shape.create.revert",
        "commandStack.shape.create.reverted",
        "commandStack.shape.delete.execute",
        "commandStack.shape.delete.executed",
        "commandStack.shape.delete.postExecute",
        "commandStack.shape.delete.postExecuted",
        "commandStack.shape.delete.preExecute",
        "commandStack.shape.delete.revert",
        "commandStack.shape.delete.reverted",
        "commandStack.shape.move.executed",
        "commandStack.shape.move.postExecute",
        "commandStack.shape.move.postExecuted",
        "commandStack.shape.move.preExecute",
        "commandStack.shape.move.reverted",
        "commandStack.shape.replace.postExecute",
        "commandStack.shape.replace.postExecuted",
        "commandStack.shape.replace.preExecuted",
        "commandStack.shape.resize.canExecute",
        "commandStack.shape.resize.executed",
        "commandStack.shape.resize.postExecute",
        "commandStack.shape.resize.postExecuted",
        "commandStack.shape.resize.preExecute",
        "commandStack.shape.resize.reverted",
        "commandStack.shape.toggleCollapse.executed",
        "commandStack.shape.toggleCollapse.postExecuted",
        "commandStack.shape.toggleCollapse.reverted",
        "commandStack.spaceTool.postExecuted",
        "commandStack.spaceTool.preExecute",
        "connect.cleanup",
        "connect.end",
        "connect.hover",
        "connect.move",
        "connect.out",
        "connect.start",
        "connection.added",
        "connection.changed",
        "connection.remove",
        "connection.removed",
        "connectionSegment.move.cancel",
        "connectionSegment.move.cleanup",
        "connectionSegment.move.end",
        "connectionSegment.move.hover",
        "connectionSegment.move.move",
        "connectionSegment.move.out",
        "connectionSegment.move.start",
        "contextPad.create",
        "contextPad.getProviders",
        "copyPaste.copyElement",
        "copyPaste.pasteElement",
        "copyPaste.pasteElements",
        "create.cleanup",
        "create.end",
        "create.hover",
        "create.init",
        "create.move",
        "create.out",
        "create.rejected",
        "create.start",
        "detach",
        "diagram.clear",
        "diagram.destroy",
        "diagram.init",
        "directEditing.activate",
        "directEditing.cancel",
        "directEditing.complete",
        "directEditing.resize",
        "drag.cleanup",
        "drag.init",
        "drag.move",
        "drag.start",
        "editorActions.init",
        "element.changed",
        "element.click",
        "element.dblclick",
        "element.hover",
        "element.marker.update",
        "element.mousedown",
        "element.mousemove",
        "element.out",
        "element.updateId",
        "elements.changed",
        "elements.delete",
        "elements.paste.rejected",
        "global-connect.canceled",
        "global-connect.cleanup",
        "global-connect.drag.canceled",
        "global-connect.drag.ended",
        "global-connect.end",
        "global-connect.ended",
        "global-connect.hover",
        "global-connect.init",
        "global-connect.out",
        "hand.canceled",
        "hand.end",
        "hand.ended",
        "hand.init",
        "hand.move.canceled",
        "hand.move.end",
        "hand.move.ended",
        "hand.move.move",
        "i18n.changed",
        "import.parse.complete",
        "interactionEvents.createHit",
        "interactionEvents.updateHit",
        "keyboard.keydown",
        "lasso.canceled",
        "lasso.cleanup",
        "lasso.end",
        "lasso.ended",
        "lasso.move",
        "lasso.lasso.selection.canceled",
        "lasso.lasso.selection.end",
        "lasso.lasso.selection.ended",
        "lasso.lasso.selection.init",
        "lasso.start",
        "moddleCopy.canCopyProperties",
        "moddleCopy.canCopyProperty",
        "moddleCopy.canSetCopiedProperty",
        "palette.create",
        "palette.getProviders",
        "popupMenu.getProviders.bpmn-replace",
        "popupMenu.open",
        "render.connection",
        "render.getConnectionPath",
        "render.getShapePath",
        "render.shape",
        "resize.cleanup",
        "resize.end",
        "resize.move",
        "resize.start",
        "selection.changed",
        "shape.added",
        "shape.changed",
        "shape.move.cleanup",
        "shape.move.end",
        "shape.move.hover",
        "shape.move.init",
        "shape.move.move",
        "shape.move.out",
        "shape.move.rejected",
        "shape.move.start",
        "shape.remove",
        "shape.removed",
        "spaceTool.canceled",
        "spaceTool.cleanup",
        "spaceTool.end",
        "spaceTool.ended",
        "spaceTool.move",
        "spaceTool.selection.canceled",
        "spaceTool.selection.cleanup",
        "spaceTool.selection.end",
        "spaceTool.selection.ended",
        "spaceTool.selection.init",
        "spaceTool.selection.move",
        "spaceTool.selection.start",
        "tool-manager.update"
      ];

 events.forEach(event => {
        _this.bpmnModeler.on(event, e => {
          console.log("事件：", event);
        });
      });
    </pre
        >
    </div>
</template>

<script>
export default {
    name: "demo",
    props: {},
    components: {},
    data() {
        return {};
    },
    computed: {},
    methods: {},
    created() {},
};
</script> 

<style scoped>
.font {
    color: rgb(255, 0, 34);
    font: bold 18px "微软雅黑";
    /* font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; */
}
</style>
